/*
  Ticket Gate
  Singapore
  Made By Buya
*/
void npc(Player @player, NPC @npc) {
int state = npc.getState();
if(state == 0) {
npc.addText("Hi, I'm a ticket gate.");
npc.sendNext();
}
else if(state == 1) {
npc.addText("I can take you back to Kerning City for just a small fee.");
npc.sendBackNext();
}
else if(state == 2) {
npc.addText("The ride to Kerning City of Victoria Island will cost you #b20000 mesos#k. Are you sure you want to return to #bKerning City#k?");
npc.sendYesNo();
}
else if(state == 3) {
if(npc.getSelected() == YES) {
if(player.getMesos() >= 20000) {
player.giveMesos(-20000);
player.changeMap(103000100);
npc.addText("Alright bye, I already reminded you that there is no refund right?");
npc.sendOK();
npc.end();
} else {
npc.addText("Ok. Bye ~");
npc.sendOK();
npc.end();
}
} else {
npc.addText("You do not have enough mesos.");
npc.sendOK();
npc.end();
}
}
}